Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change payload for Continuous Profiling v8 (p2) #3711

Merged

Conversation

stefanosiano
Copy link
Member

@stefanosiano stefanosiano commented Sep 23, 2024

📜 Description

added profile_chunk envelope create
added IHub.captureProfileChunk and ISentryClient.captureProfileChunk
added profilerId and chunkId reset logic to AndroidContinuousProfiler
added absolute timestamps to ProfileMeasurementValue
added ProfileContext to Contexts

#skip-changelog

💡 Motivation and Context

Implements payload changes for Continuous Profiling
Part 2 of #3710

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

added IHub.captureProfileChunk and ISentryClient.captureProfileChunk
added profilerId and chunkId reset logic to AndroidContinuousProfiler
added absolute timestamps to ProfileMeasurementValue
added ProfileContext to Contexts
@stefanosiano stefanosiano marked this pull request as ready for review September 23, 2024 10:47
Copy link
Contributor

github-actions bot commented Sep 23, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 5ebb536

Copy link
Contributor

github-actions bot commented Sep 23, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 464.43 ms 520.84 ms 56.41 ms
Size 1.65 MiB 2.31 MiB 677.69 KiB

Previous results on branch: feat/continuous-profiling-part2

Startup times

Revision Plain With Sentry Diff
4e27f0d 425.02 ms 452.80 ms 27.78 ms
ae2da55 448.49 ms 482.66 ms 34.17 ms

App size

Revision Plain With Sentry Diff
4e27f0d 1.65 MiB 2.31 MiB 674.06 KiB
ae2da55 1.65 MiB 2.31 MiB 674.06 KiB

…ta, now it uses timestamp.nanotime() to achieve same result

profiler resets chunk id and profiler id in case profile is not recorded due to an error
…rofiling-part2

# Conflicts:
#	sentry-android-core/src/main/java/io/sentry/android/core/AndroidContinuousProfiler.java
#	sentry-android-core/src/main/java/io/sentry/android/core/AndroidProfiler.java
#	sentry/api/sentry.api
#	sentry/src/main/java/io/sentry/HubAdapter.java
#	sentry/src/test/java/io/sentry/protocol/ContextsTest.kt
* added profile context to SentryTracer
* removed isProfilingEnabled from AndroidContinuousProfiler, as it's useless
* added continuous profiler to SentryOptions
* added DefaultTransactionPerformanceCollector to AndroidContinuousProfiler
* updated DefaultTransactionPerformanceCollector to work with string ids other than transactions
* fixed ProfileChunk measurements being modifiable from other code
* added thread id and name to SpanContext.data
* added profiler_id to span data
* close continuous profiler on scopes close
* renamed TransactionPerformanceCollector to CompositePerformanceCollector
* added SpanContext.data ser/deser

Handle App Start Continuous Profiling v8 (p4) (#3730)
* create app start continuous profiler instead of transaction profiler, based on config
* updated SentryAppStartProfilingOptions with isContinuousProfilingEnabled flag
* updated SentryOptions with isContinuousProfilingEnabled() method
* cut profiler setup out in a specific function to improve readability of AndroidOptionsInitializer

Add new APIs for Continuous Profiling v8 (p5) (#3844)
* AndroidContinuousProfiler now retrieve the scopes on start()
* removed profilesSampleRate from sample app to enable continuous profiling
* added Sentry.startProfiler and Sentry.stopProfiler APIs
@stefanosiano stefanosiano merged commit a9235ae into feat/continuous-profiling-part1 Nov 14, 2024
25 checks passed
@stefanosiano stefanosiano deleted the feat/continuous-profiling-part2 branch November 14, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants